import { defineConfig } from "vitepress";
import nav from "./nav.mts";
import sidebar from "./sidebar.mts";
// https://vitepress.dev/reference/site-config
export default defineConfig({
 // base: "/docs-vue-video-plus/",
  //美化地址栏icon
//  head: [["link", { rel: "icon", href: "/docs-vue-video-plus/logo.png" }]],
  title: "vueVideo++",
  description: "vue video",
  //文件根目录
  srcDir: "docs",

  themeConfig: {
    //用于替代On this page
    outlineTitle: "目录",
    //outline定义展示的标题级别，这里定义2-6级
    outline: [2, 6],
    logo: "/logo.png",
    // https://vitepress.dev/reference/default-theme-config
    //顶部导航配置
    nav: nav,

    //侧边栏配置
    sidebar: sidebar,

    //搜索框
    search: {
      provider: "local",
      options: {
        locales: {
          zh: {
            translations: {
              button: {
                buttonText: "搜索文档",
                buttonAriaLabel: "搜索文档",
              },
              modal: {
                noResultsText: "无法找到相关结果",
                resetButtonTitle: "清除查询条件",
                footer: {
                  selectText: "选择",
                  navigateText: "切换",
                },
              },
            },
          },
        },
      },
    },

    //最后更新时间
    lastUpdated: {
      text: "最后更新时间",
      formatOptions: {
        dateStyle: "full",
        timeStyle: "medium",
      },
    },

    socialLinks: [
      {
        //自定义图标配置
        // icon: {
        //   svg: '<svg t="1737737531285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11212" width="1024" height="1024"><path d="M0 320v320h288v64h224v-64h512V320H0z" fill="#CB3837" p-id="11213"></path><path d="M174.784 384H64v192h110.784v-140.448h56.352V576h56.384v-192H174.784z m169.088 0v256h112.736v-64h110.784v-192h-223.52z m167.168 140.448h-54.432V435.52h54.4v88.896zM734.528 384h-110.784v192h110.784v-140.448h56.384V576h56.352v-140.448h56.384V576H960v-192h-225.472z" fill="#FFFFFF" p-id="11214"></path></svg>',
        // },
        icon: "npm",
        link: "https://www.npmjs.com/package/vue-video-plus",
      },
    ],

    //页脚配置
    footer: {
      message: "Released under the MIT License.",
      copyright: "Copyright © 2019-present Evan You",
    },
    //隐藏标题
    //siteTitle: false,
    //自定义侧边栏菜单标签,默认为英文，该标签仅在移动端视图中显示。
    sidebarMenuLabel: "菜单",
    //自定义返回顶部按钮的标签，默认为英文，该标签仅在移动端视图中显示。
    returnToTopLabel: "返回顶部",
    darkModeSwitchLabel: "外观",
    lightModeSwitchTitle: "切换到浅色模式",
    darkModeSwitchTitle: "切换到深色模式",
  },

  markdown: {
    lineNumbers: true,
    container: {
      tipLabel: "提示",
      warningLabel: "警告",
      dangerLabel: "危险",
      infoLabel: "信息",
      detailsLabel: "详细信息",
    },
  },
});
